package com.spddr.pmos.cxf;

import java.util.List;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.spddr.pmos.jpa.UnitNhq;
import com.spddr.pmos.jpa.UnitNhqId;

import cn.seqdata.cxf.repos.JaxrsRepository;
import cn.seqdata.echarts.Option;

@Path("/unit/{unit}/nhq")
public interface JaxrsUnitNhq extends JaxrsRepository<UnitNhq, UnitNhqId> {
	@GET
	List<UnitNhq> findByUnit(@PathParam("unit") long unit);

	@PUT
	void saveByUnit(@PathParam("unit") long unit, List<UnitNhq> entities);

	@DELETE
	void deleteByUnit(@PathParam("unit") long unit);

	@GET
	@Path("/chart")
	@JsonIgnore
	Option chart(@PathParam("unit") long unit);
}
